package strategy;

/**
 * Created by longshihan on 2017/7/4.
 * 策略模式
 */
public class MainClass {
    public static void main(String args[]) {
        Strategy strategy = new MD5Strategy();
        strategy.entcryty();

        //策略模式应用
        Context context = new Context(new MDSStrategy());
        context.entcryty();

        //新
        double num = 200;
        Contextt contextt = new Contextt(new StrategyB());
        double newnum=contextt.cost(num);
        System.out.println("实际："+newnum);
    }
}
